#include<iostream>
#include<fstream>

#include "../include/dataList.h"
using namespace std;

int main(){
	ifstream ifs;
	ifs.open("data/sortTest.dat");
	dataList<int> lis;
	int input;
	Element<int> temp;
	while(ifs >> input){
		temp.setKey(input);
		lis.insert(temp);
	}
	int len = lis.Length();
	cout<<"the length of datalist :"<<len<<endl;
	lis.PrintDataList();
	cout<<"sort by Bubble Sort :"<<endl;
	//BubbleSort(lis,0,len -1);
	cout<<"sort by Shell Sort :"<<endl;
	//ShellSort(lis,0,len -1);
	cout<<"sort by Insert Sort:"<<endl;
	//InsertSort(lis,0,len -1 );
	cout<<"sort by Quick Sort :"<<endl;
	//QuickSort(lis,0,len -1 );
	cout<<"sort by Select Sort :"<<endl;
	//SelectSort(lis,0,len -1);
	cout<<"sort by merge Sort :"<<endl;
	//MergeSort(lis,0,len -1);
	cout<<"sort by heap Sort :"<<endl;
	HeapSort(lis);
	return 0;
}
